package com.samuel.repository;


import com.samuel.domain.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;

import javax.sql.DataSource;

/**
 * {@link User 用户} 的仓储
 * @date:2017/11/27
 * @time: 19:19
 * @author:zhaoyang
 * @desc:
 **/

@Repository
public class UserRePository {


    @Qualifier("dataSource")
    @Autowired
    private final  DataSource dataSource;

    public UserRePository(DataSource dataSource) {
        this.dataSource = dataSource;
    }



    public  boolean save(User user){
        System.out.println("save USer..."+user.toString());
        return true;
    }
}
